<template>
  <div id="tab-bar">
    <tab-bar-item path="/home">
      <img src="@/assets/img/tabbar/home.svg" alt="" slot="item-icon">
      <img src="@/assets/img/tabbar/home_active.svg" alt="" slot="item-icon-active">
      <div slot="item-text">首页</div>
    </tab-bar-item>
    <tab-bar-item path="/category">
      <img src="@/assets/img/tabbar/category.svg" alt="" slot="item-icon">
      <img src="@/assets/img/tabbar/category_active.svg" alt="" slot="item-icon-active">
      <div slot="item-text">分类</div>
    </tab-bar-item>
    <tab-bar-item path="/shopcart">
      <img src="@/assets/img/tabbar/shopcart.svg" alt="" slot="item-icon">
      <img src="@/assets/img/tabbar/shopcart_active.svg" alt="" slot="item-icon-active">
      <div slot="item-text">购物车</div>
    </tab-bar-item>
    <tab-bar-item path="/profile">
      <img src="@/assets/img/tabbar/profile.svg" alt="" slot="item-icon">
      <img src="@/assets/img/tabbar/profile_active.svg" alt="" slot="item-icon-active">
      <div slot="item-text">我的</div>
    </tab-bar-item>
    
  </div>
</template>

<script>
  import TabBarItem from "./TabBarItem"
  export default {
    name: "TabBar",
    components: {
      TabBarItem
    },
  }
</script>

<style scoped>
  #tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    box-shadow: 0 -3px 1px rgba(100, 100, 100, 0.08);
    z-index: 2;
  }
</style>